﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SPattern.BasicClass
{
    /// <summary>
    /// Item(項目): 代表顧客交易的產品
    /// </summary>
    [Serializable]
    public class Item
    {
        public string Id { get; set;}

        public Item() { }

        public Item(string id)
        {
            Id = id;
        }

        public override bool Equals(object obj)
        {
            Item item = (Item)obj;
            return item.Id == this.Id;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override string ToString()
        {
            return Id;
        }
    }
}
